﻿using MongoDB.Driver;

namespace ChatGPT.Repository;

public interface IMongoRepository<TEntity>
{
    /// <summary>
    ///     Adds the specified entity.
    /// </summary>
    /// <param name="entity">The entity.</param>
    /// <returns></returns>
    Task AddAsync(TEntity entity);

    /// <summary>
    ///     Gets the entity with the specified identifier.
    /// </summary>
    /// <param name="filter"></param>
    /// <returns></returns>
    List<TEntity> Find(FilterDefinition<TEntity> filter, SortDefinition<TEntity> sort);
}